<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s"  uri="/struts-tags"%>
<s:if test='FLAG=="EDIT"'>
<title>用户信息修改</title>
<span id="navlink">系统设置>>用户管理 >> 用户信息修改</span>
</s:if>
<s:elseif test='FLAG=="ADD"'>
<title>用户添加</title>
<span id="navlink">系统设置>>用户管理 >> 用户添加</span>
</s:elseif>



<s:form action="systemActionDo" namespace="/system" method="post" id="form" >
<s:if test='FLAG=="EDIT"'>
	<input type="hidden" name="user.userid" value="${user.userid}" />
</s:if>	
<table class="table_box table_all_border" cellspacing="0" cellpadding="0">
	<tr><td align="right" style="width:100px"><span class="need">*</span>用户名</td><td><input type="text" name="user.useraccount" value="${user.useraccount}" <s:if test='FLAG=="EDIT"'>readonly="true" class="readonly" </s:if> /></td></tr>
	<tr><td align="right"><span class="need">*</span>邮箱</td><td><input type="text" name="user.email" value="${user.email}"/></td></tr>
<s:if test='FLAG=="EDIT"'>
	<tr><td align="right"><span class="need">*</span>角色</td><td>
<s:checkboxlist name="userNewRoles" list="allrole" listKey="roleid" listValue="roledesc" value="user_now_role" />
	</td></tr>
</s:if>	
	<tr><td align="right"><span class="need">*</span>启用</td><td>
    <input type="radio" name="user.enabled" value="true" <s:if test='user.enabled'>checked="checked"</s:if> />启用
    <input type="radio" name="user.enabled" value="false" <s:if test='!user.enabled'>checked="checked"</s:if> />关闭
		</td>
	</tr>
	<tr><td align="right"><span class="need">*</span>管理员</td><td>
    <input type="radio" name="user.isadmin" value="true" <s:if test='user.isadmin'>checked="checked"</s:if> />启用
    <input type="radio" name="user.isadmin" value="false" <s:if test='!user.isadmin'>checked="checked"</s:if> />关闭
		</td>
	</tr>
<s:if test='FLAG=="ADD"'>
	<tr><td align="right"><span class="need">*</span>密码</td><td><input type="password" name="password1" value=""/></td></tr>
	<tr><td align="right"><span class="need">*</span>再次输入密码</td><td><input type="password" name="password2" value=""/></td></tr>
</s:if>
<s:if test='FLAG=="EDIT"'>
	<tr><td align="right">密码</td><td><input type="password" name="password1" value=""/><span class="need">输入新密码进行密码修改，否则请留空。</span></td></tr>
	<tr><td align="right">再次输入密码</td><td><input type="password" name="password2" value=""/></td></tr>
</s:if>
	<tr><td align="right">真实姓名</td>	<td><input type="text" name="user.realname" value="${user.realname}"/></td></tr>
	<tr><td align="right">昵称</td><td><input type="text" name="user.nickname" value="${user.nickname}"/></td></tr>
	<tr><td align="right">电话</td><td><input type="text" name="user.phone" value="${user.phone}"/></td></tr>
	<tr><td align="right">传真</td><td><input type="text" name="user.fax" value="${user.fax}"/></td></tr>
	<tr><td align="right">地址</td><td><input type="text" name="user.address" value="${user.address}"/></td></tr>
	<tr><td align="right">邮编</td><td><input type="text" name="user.zip" value="${user.zip}"/></td></tr>
	<tr><td align="right">描述</td><td><input type="text" name="user.userdesc" value="${user.userdesc}"/></td></tr>
	<tr><td align="right">照片</td><td><input type="text" name="user.photo" value="${user.photo}"/></td></tr>
</table>

<div id="button_area">
<s:if test='FLAG=="EDIT"'>
	<s:submit name="useredit" value="提交" method="useredit"/>
</s:if><s:elseif test='FLAG=="ADD"'>
	<s:submit name="addusersave" value="提交" method="usersave"/>
</s:elseif>
</div>       
</s:form>